1
'***************************** Module Header ******************************\
2 '* Module Name: LocationConverter.vb
3 '* Project: AzureBingMaps
4 '* Copyright (c) Microsoft Corporation.
6 '* A Silverlight converter.
7 '* Converts Travel data to Bing Maps Location.
9 '* This source is subject to the Microsoft Public License.
10 '* See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
11 '* All other rights reserved.
13 '* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
14 '* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
15 '* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
16 '\**************************************************************************
19 Imports System
.Device
.Location
20 Imports System
.Windows
.Data
21 Imports WindowsPhoneClient
.AzureBingMaps
.DAL
24 ''' A Silverlight converter.
25 ''' Converts Travel data to Bing Maps Location.
27 Public Class LocationConverter
28 Implements IValueConverter
29 Public Function Convert( _
30 ByVal value
As Object, _
31 ByVal targetType
As Type, _
32 ByVal parameter
As Object, _
33 ByVal culture
As System
.Globalization
.CultureInfo _
34 ) As Object Implements IValueConverter
.Convert
35 If TypeOf value Is Travel
Then
36 Dim t
As Travel
= DirectCast(value
, Travel
)
37 Return New GeoCoordinate(t
.Latitude
, t
.Longitude
)
42 Public Function ConvertBack( _
43 ByVal value
As Object, _
44 ByVal targetType
As Type, _
45 ByVal parameter
As Object, _
46 ByVal culture
As System
.Globalization
.CultureInfo _
47 ) As Object Implements IValueConverter
.ConvertBack
48 Throw
New NotImplementedException()